#ifndef 		_RECORD_H_

#define 		_RECORD_H_

#include "list.h"
#include "table.h"

#define 		MAX_STR_LENGTH 		256

enum ATTR
{
	nul, ident, constint, conststr, eql, neq, lss, leq, gtr, geq, period, op_and, op_or, op_not, semicolon, op_create, op_drop, op_show, op_desc, op_select, op_from, op_where, op_insert, op_into, op_values, op_delete, op_update, op_set, op_table, op_tables, op_alter, op_int, op_varchar
};

struct OPNODE
{
	struct OPNODE 	*lchild;
	struct OPNODE 	*rchild;

	enum ATTR 		op;
	int 			iType;
	void* 			pValue;
};

int insert_record(char* szTableName, struct LIST *plList);

int delete_record(char* szTableName, struct OPNODE* root);

int select_record(char* szTableName, struct LIST *plList, struct OPNODE* root, int iFlag);

int update_record(char* szTableName, struct LIST *plList, struct VARNODE *svpNewValue, struct OPNODE* root);

#endif
